//index.js
//获取应用实例
const app = getApp()
var QR = require("../../utils/qrcode.js");
var util = require('../../utils/util.js');
const hours = []
const mins = []
const times = []

for (let i = 0; i < 25; i++) {
  hours.push(i)
}

for (let i = 0; i < 60; i++) {
  mins.push(i)
}

for (let i = 0; i <= 99; i++) {
  times.push(i)
}
Page({
  data: {
    hours: hours,
    mins: mins,
    times: times,
    hour: 0,
    min: 1,
    time: 0,
    effectiveness: ''
  },
  //事件处理函数
  bindViewTap: function () {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  changeToVisitor: function () {
    var that = this;
    wx.navigateTo({
      url: '../visitor/visitor?hour=' + that.data.hour + '&min=' + that.data.min + '&time=' + that.data.time
    })
  },
  onLoad: function (options) {
  },
  getUserInfo: function (e) {

  },
  changeToSetting: function () {
    wx.navigateTo({
      url: '../setting/setting',
    })
  },
  bindChange: function (e) {
    var that = this;
    const val = e.detail.value;
    that.setData({
      hour: that.data.hours[val[0]],
      min: that.data.mins[val[1]],
      time: that.data.times[val[2]]
    })
  },
  
})
